<?php

Raise::load('core.postback.RaiseFieldFeedback');

/**
 * TestCoreRaiseFieldFeedback class
 * Testing unit of 'phpraise/core/RaiseFieldFeedback.php'
 *
 * @author Sam-Mauris Yong / hellclanner at live dot com
 * @license http://www.opensource.org/licenses/bsd-license New BSD License
 * @package Raise.UnitTest.Test
 */
class TestCoreRaiseFieldFeedback extends RaiseTest {

    public static function testClass(){
        self::assertClassExists('RaiseFieldFeedback');
        self::assertClassExtends('RaiseFieldFeedback', 'RaiseObject');
        self::assertClassMethod('RaiseFieldFeedback', 'field');
        self::assertClassMethod('RaiseFieldFeedback', 'value');
        self::assertClassMethod('RaiseFieldFeedback', 'exceptions');
    }

    public static function testObject(){
        $feedback = new RaiseFieldFeedback('fieldName', 'dataValue');
        self::assertStrictEqual($feedback->field(), 'fieldName');
        self::assertStrictEqual($feedback->value(), 'dataValue');
        self::assertObjectClass($feedback->exceptions(), 'RaiseTypedCollection');
    }

}
